echo off
echo ==========================================================================
echo $Id: make-primenumber.bat 40 2012-11-27 17:27:23Z denis.skalsky@gmail.com $
echo ==========================================================================
echo 1) Delete .\bin\classes\com\globallogic\skalskyy\javabasic\primenumber\*.class
del /S .\bin\classes\com\globallogic\skalskyy\javabasic\primenumber\*.class
echo ==========================================================================
echo 2) Delete .\bin\testclasses\com\globallogic\skalskyy\javabasic\primenumber\*.class
del /S .\bin\testclasses\com\globallogic\skalskyy\javabasic\primenumber\*.class
echo ==========================================================================
echo 3) Compile source: .\src\com\globalogic\skalskyy\javabasic\primenumber\*.java
javac -d .\bin\classes -classpath ".\inputdata.jar" .\src\com\globallogic\skalskyy\javabasic\primenumber\*.java
echo ==========================================================================
echo 4) Compile tests: .\test\com\globallogic\skalskyy\javabasic\primenumber\*.java
javac -d .\bin\testclasses -classpath "C:\Program Files\Java\jdk1.6.0_37\lib\junit4.10\junit-4.10.jar";"C:\Program Files\Java\jdk1.6.0_37\lib\easymock-3.1\easymock-3.1.jar";".\bin\classes" .\test\com\globallogic\skalskyy\javabasic\primenumber\*.java
echo ==========================================================================
echo 5) Run unit tests
java -classpath "C:\Program Files\Java\jdk1.6.0_37\lib\junit4.10\junit-4.10.jar";"C:\Program Files\Java\jdk1.6.0_37\lib\easymock-3.1\easymock-3.1.jar";".\bin\testclasses";".\bin\classes" org.junit.runner.JUnitCore com.globallogic.skalskyy.javabasic.primenumber.PrimeNumberTest
echo ==========================================================================
echo 6) Create package: primenumber.jar
jar cvf primenumber.jar -C .\bin\classes com\globallogic\skalskyy\javabasic\primenumber